﻿namespace DesignModeConsole.创建型.抽象工厂模式.Sample2
{
    /// <summary>
    /// 中国个人奖金
    /// </summary>
    public class ChineseBonus : Bonus
    {
        /// <summary>
        /// 计算
        /// </summary>
        /// <returns></returns>
        public double Calculate()
        {
            return SalaryConst.BaseSalary * 0.1;
        }
    }

    /// <summary>
    /// 个人所得税
    /// </summary>
    public class ChineseTax : Tax
    {
        public double Calculate()
        {
            return SalaryConst.BaseSalary + (SalaryConst.BaseSalary + 0.1) + 0.4;
        }
    }
}